--------------------------------------------------------------------------------

Basic.System INFO external command by Clark Hugh Stiles

--------------------------------------------------------------------------------
This is a bit of 8-bit programming, for which I used the Merlin Assembler. This is a handy external command for Basic.System, the environment for AppleSoft BASIC Apple provided for its ProDOS operating system on the Apple II. Apple, Apple II, AppleSoft, Basic.System, and ProDOS are all trademarks of and copyright by Apple Computer, Inc. Merlin was copyright by Roger Wagner publishing, not sure if that's relevant now. 

Anyway, I found a copy of the SHK file online Friday, February 18, 2005, and noticed (to my surprise) that the 15th anniversary ("Finished February 20, 1990") of this project's completion is upon me. This must be what the missing time phenomenon feels like to those poor, suffering UFO abductees. 

That was a joke, lighten up. 

The online bsc archive (which encased a SHK archive) of the old version of the INFO command. I think that one has an inconvenient bug in it, but in either case, it isn't quite as fancy as version 2. 

here's a faux source of version 2 of the Info command: 
 
2000: 38           SEC 
2001: A9 22        LDA #22 
2003: E9 21        SBC #21 
2005: 8D C4 20     STA 20C4 
2008: EE C4 20     INC 20C4 
200B: AD C4 20     LDA 20C4 
200E: 20 F5 BE     JSR BEF5 
2011: 90 05        BCC 2018 {+05} 
2013: A9 0E        LDA #0E 
2015: 4C 09 BE     JMP BE09 
2018: 8D C5 20     STA 20C5 
201B: AD 07 BE     LDA BE07 
201E: 8D 26 22     STA 2226 
2021: AD 08 BE     LDA BE08 
2024: 8D 27 22     STA 2227 
2027: A2 00        LDX #00 
2029: 8E 07 BE     STX BE07 
202C: AE C5 20     LDX 20C5 
202F: E8           INX 
2030: 8E 08 BE     STX BE08 
2033: AE C5 20     LDX 20C5 
2036: 8E 9A 21     STX 219A 
2039: 8E 0F 22     STX 220F 
203C: 8E 1A 22     STX 221A 
203F: E8           INX 
2040: 8E 58 21     STX 2158 
2043: 8E 66 21     STX 2166 
2046: A9 00        LDA #00 
2048: 85 3C        STA 3C 
204A: A9 21        LDA #21 
204C: 85 3D        STA 3D 
204E: A9 FE        LDA #FE 
2050: 85 3E        STA 3E 
2052: A9 22        LDA #22 
2054: 85 3F        STA 3F 
2056: A9 00        LDA #00 
2058: 85 42        STA 42 
205A: AD C5 20     LDA 20C5 
205D: 85 43        STA 43 
205F: A0 00        LDY #00 
2061: 20 2C FE     JSR FE2C 
2064: 20 8E FD     JSR FD8E 
2067: A0 00        LDY #00 
2069: B9 75 20     LDA 2075,Y 
206C: 20 ED FD     JSR FDED 
206F: C8           INY 
2070: C0 4F        CPY #4F 
2072: D0 F5        BNE 2069 {-0B} 
2074: 60           RTS 

First, launch BASIC.SYSTEM. Then type HGR:TEXT to clear out the part of memory you'll be using and return to the text screen. Enter the above code by CALL-151 or (under later versions of Basic.System) MTR, then ! (the exclamation point) to start the miniassembler, and enter the first line (2000: 38), hit the Return key, then enter a space and the next bit of code (A9 22) and Return, then a space, and so forth. When done, hit Return on an empty line, then type the following at the asterisk prompts. Stop typing each line once you see the hyphen (and don't type the hyphen). Hit Return at that point: 
 
2075:C9 CE C6 CF A0 E3 EF ED ED E1 EE-INFO comman 
2080:E4 A0 F6 E5 F2 F3 E9 EF EE A0 B2 A0 E2 F9 A0 C3-d version 2 by C 
2090:AE C8 AE D3 F4 E9 EC E5 F3 8D 8D C9 CE C6 CF A0-.H.Stiles..INFO 
20A0:DB F0 E1 F4 E8 EE E1 ED E5 DD DB AC D4 DD DB AC-[pathname][,T][, 
20B0:C1 DD DB AC CC DD DB AC D6 DD DB AC D3 DD DB AC-A][,L][,V][,S][, 
20C0:C4 DD 8D 8D 00 00 00 00 00 00 00 00 00 00 00 00-D].............. 
20D0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00-................ 
20E0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00-................ 
20F0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00-................ 
2075.20ff 

That last line just lists what you've done. To view everything so far, enter 2000.20FF and hit Return. Next you'll have to do some more miniassembly, entering the following code, which is the command parser routine. 
 
2200: D8           CLD 
2201: A0 00        LDY #00 
2203: A2 00        LDX #00 
2205: BD 00 02     LDA 0200,X 
2208: E8           INX 
2209: C9 A0        CMP #A0 
220B: F0 F8        BEQ 2205 {-08} 
220D: D9 F9 21     CMP 21F9,Y 
2210: F0 0B        BEQ 221D {+0B} 
2212: C9 E0        CMP #E0 
2214: 90 0E        BCC 2224 {+0E} 
2216: 29 DF        AND #DF 
2218: D9 F9 21     CMP 21F9,Y 
221B: D0 07        BNE 2224 {+07} 
221D: C8           INY 
221E: C0 04        CPY #04 
2220: D0 E3        BNE 2205 {-1D} 
2222: F0 04        BEQ 2228 {+04} 
2224: 38           SEC 
2225: 4C 00 00     JMP 0000 
2228: 88           DEY 
2229: 8C 52 BE     STY BE52 
222C: A9 00        LDA #00 
222E: 8D 50 BE     STA BE50 
2231: A9 21        LDA #21 
2233: 8D 51 BE     STA BE51 
2236: A9 00        LDA #00 
2238: 8D 53 BE     STA BE53 
223B: A9 85        LDA #85 
223D: 8D 54 BE     STA BE54 
2240: A9 94        LDA #94 
2242: 8D 55 BE     STA BE55 
2245: 18           CLC 
2246: 60           RTS 

Enter the above by typing ! at the * prompt to again enter the miniassembler, type the first line (2200:D8) then Return (in other words, ignore the rest of the line, which says "CLD), then a space and the next bit (A0 00) and Return, and so forth. After you've type 2246: 60 and Return, hit Return on an empty line, and type this: 
 
2247:BF BF BF FF D3 F9 F3 FE D2-???.Sys~R 
2250:E5 EC FD D6 E1 F2 FC C2 E1 F3 FB C9 F6 F2 FA C9-el}Var|Bas{IvrzI 
2260:EE F4 F9 D0 B1 B6 F0 C3 ED E4 E2 CE E5 F4 E0 CC-ntyP16pCmdbNet`L 
2270:E9 E2 DB C4 E2 CD CA C9 E3 EE C8 C6 EF EE C7 C3-ib[DbMJIcnHFonGC 
2280:E4 F6 C5 C7 F2 E6 C1 D3 E8 F2 C0 D0 E9 E3 BF C4-dvEGrfAShr@Pic?D 
2290:EF E3 BD C6 F3 F4 BC C7 EC E6 BB C4 F2 F6 BA D4-oc=Fst
That's the data table for the filetype tags. Stop typing each line once you see the hyphen (and don't type the hyphen). Hit Return. 
 
2100: A9 0A        LDA #0A 
2102: 8D B4 BE     STA BEB4 
2105: A9 C4        LDA #C4 
2107: 20 70 BE     JSR BE70 
210A: B0 3C        BCS 2148 {+3C} 
210C: AD 56 BE     LDA BE56 
210F: 0A           ASL 
2110: 18           CLC 
2111: 6D 57 BE     ADC BE57 
2114: 29 98        AND #98 
2116: C9 01        CMP #01 
2118: 90 2C        BCC 2146 {+2C} 
211A: 10 0C        BPL 2128 {+0C} 
211C: AE 58 BE     LDX BE58 
211F: 8E B9 BE     STX BEB9 
2122: AE 59 BE     LDX BE59 
2125: 8E BA BE     STX BEBA 
2128: 0A           ASL 
2129: 0A           ASL 
212A: 0A           ASL 
212B: 10 06        BPL 2133 {+06} 
212D: AE 5F BE     LDX BE5F 
2130: 8E B7 BE     STX BEB7 
2133: 0A           ASL 
2134: 10 06        BPL 213C {+06} 
2136: AE 6A BE     LDX BE6A 
2139: 8E B8 BE     STX BEB8 
213C: A9 07        LDA #07 
213E: 8D B4 BE     STA BEB4 
2141: A9 C3
...[Message truncated] 
